﻿@model TestMessageTemplateModel

@{
    //page title
    ViewBag.Title = T("Admin.ContentManagement.MessageTemplates.TestDetails").Text;
    //active menu item (system name)
    Html.SetActiveMenuItemSystemName("Message templates");
}

<form asp-controller="MessageTemplate" asp-action="TestTemplate" method="post" id="specificationattribute-form">
    <div class="content-header clearfix">
        <h1 class="pull-left">
            @T("Admin.ContentManagement.MessageTemplates.TestDetails")
            <small>
                <i class="fa fa-arrow-circle-left"></i>
                <a asp-action="Edit" asp-route-id="@Model.Id">@T("Admin.ContentManagement.MessageTemplates.Test.BackToTemplate")</a>
            </small>
        </h1>
        <div class="pull-right">
            <button type="submit" name="send-test" class="btn bg-blue">
                @T("Admin.ContentManagement.MessageTemplates.Test.Send")
            </button>
        </div>
        @await Component.InvokeAsync("AdminWidget", new { widgetZone = "admin_message_template_test_buttons" })
    </div>
    <input asp-for="Id" type="hidden" />

    <div class="content">
        <div class="form-horizontal">
            <div class="panel-group">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-label asp-for="SendTo" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="SendTo" asp-required="true" />
                                <span asp-validation-for="SendTo"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-9 col-md-offset-3">
                                @T("Admin.ContentManagement.MessageTemplates.Test.Tokens.Description")
                            </div>
                        </div>
                        @foreach (var token in Model.Tokens)
                        {
                            <div class="form-group">
                                <div class="col-md-3">
                                    <div class="label-wrapper">
                                        <label class="control-label">
                                            @token
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-9">
                                    <input type="text" name="token_@(token)" class="form-control" />
                                </div>
                            </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>